import {connect} from 'react-redux'
import Count from "../comprents/count"

import {addFn} from '../redux/action'

function mapStateToProps(state) {
    return {
        xxx:state.count
        
    }
}
// (state)=>(xxx:state.Count)
function mapDispatchToProps(dispatch) {
    return {
        add(num) {
            
            dispatch(addFn(num))
        }
    }
}

const WithCount = connect(mapStateToProps, mapDispatchToProps)(Count);

export default WithCount